#ifndef ROLLCADRESEARCHDIALOG_H
#define ROLLCADRESEARCHDIALOG_H

#include <QDialog>
#include <QTreeWidgetItem>
#include <QHash>
#include "rollcadresearchresultdialog.h"
#include <QBrush>


namespace Ui {
class RollCadreSearchDialog;
}

class RollCadreSearchDialog : public QDialog
{
    Q_OBJECT

public:
    explicit RollCadreSearchDialog(QWidget *parent = 0);
    ~RollCadreSearchDialog();

private slots:

    void on_conditionTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);

    void on_selectedTreeWidget_itemDoubleClicked(QTreeWidgetItem *item, int column);

    void on_searchPushButton_clicked();

    void on_parampushButton_clicked();

    void on_selectedpushButton_clicked();

    void on_samenamepushButton_clicked();

signals:

    void sendData(QHash<QString,QStringList> hash);   //用来传递hash数据的信号

private:
    Ui::RollCadreSearchDialog *ui;
    QTreeWidgetItem *treeitem;
    QHash<QString,QStringList> hash;
    void treeRender();
    void treeItemRender(QString pitem , QString table, QString name);
    void treeYNItemRender(QString pitem ,QStringList names);
    QBrush m_itemBrush;
    void searchChild(QTreeWidgetItem *cItem, const QString &txt);
    void parentExpand(QTreeWidgetItem *item);
    void searchTree(QTreeWidget *treewidget,QString txt);
};

#endif // ROLLCADRESEARCHDIALOG_H
